package com.jiaeda.shiromaster.mapper;

import com.jiaeda.shiromaster.entity.SysDepartment;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

/**
 * Created by chengchaopeng on 2018/6/27.
 */
@Mapper
@Component
public interface SysDepartmentMapper {
    @Select("select id,department_key as departmentKey,department_value as departmentValue,description," +
            "parent_departmentkey as parentDepartmentkey,DATE_FORMAT(create_time, '%Y-%m-%d %T') as createTime " +
            "from sys_department where department_key=#{departmentKey}")
    SysDepartment findByDepartmentKey(@Param("departmentKey") String departmentKey);


}
